﻿#ifndef GAMETABLEMODEL_H
#define GAMETABLEMODEL_H

#include <QSqlQueryModel>

class GameTableModel : public QSqlQueryModel
{
    Q_OBJECT

public:
    enum role {
       CellRole = Qt::UserRole + 1
    };

    GameTableModel(QObject *parent = nullptr);
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
    QHash<int, QByteArray> roleNames() const override;

   Q_INVOKABLE QString trPlantName(const QString &plantName) const;
   Q_INVOKABLE QString trInverterName(const QString &inverterName) const;

private:
};

#endif // GAMETABLEMODEL_H
